﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Text;
using System.IO;
using System.Dynamic;
using FluorineFx.Json;

namespace lxwmvc
{
    public static class usercontroller
    {
        /// <summary>
        /// 全局引用
        /// </summary>
        /// <param name="pb"></param>
        public static void _init(pagebase pb)
        {
            var user_id = core_user.userID;
            if (user_id.tostr() == "") pb.exit("没有权限操作!");
        }

      
        /// <summary>
        /// </summary>
        /// <param name="pb"></param>
        [json]
        public static void index(pagebase pb)
        {
           
        }

        /// <summary>
        /// 判断用户是否在汇付开户开户，如果没有，返回用户基本信息
        /// </summary>
        /// <param name="pb"></param>
        [json]
        public static void huifu_kaihu_check(pagebase pb)
        {
            BaseJson json = pb.JSON<BaseJson>();
            //代表已经开户，前台就要跳转信息
            if (core_user.checkUserSFKaiHu())
            {
                json.msg = "OK";
            }
            else
            {
                json.msg = "NO";

                //email,sysuser.user_id,MOBIL_NO,CardNum,sysuser_kuozhan.TrueName
                //输出json信息
                json.data = core_user.getUserInfo().tojson();
            }
        }
    }
}